﻿@{
    ViewBag.Title = "账户总览";
    Layout = "~/Views/Shared/_LayoutFore.cshtml";
}
@section style{

}
@section script{
 
    <script type="text/javascript">
        $(function () { 
            $("#Register").Validform({
                btnSubmit: ".BtnRegister",
                tiptype: 3,
                callback: function (form) { 
                     Register(); 
                    return false;
                }
            });  
        });
        //注册
        function Register() {
            //var sign = "callback=" + $("#callback").val() + "&idCardNo=" + $("#idCardNo").val() + "&merchantNo=" + $("#merchantNo").val()
            //    + "&realName=" + $("#realName").val() + "&timestamp=temp&userName=" + $("#userName").val();
            //sign = sign.replace(/\&/g, "|");
            //alert(sign);
            //$.ajax({
            //    url: "/Account/SftRegister",
            //    type: "Post",
            //    data: "sign=" + sign + "&idCardNo=" + $("#idCardNo").val() + "&realName=" + $("#realName").val() + "&userName=" + $("#userName").val(),
            //    success: function (data) {
            //        var time = data.substring(0, 14);
            //        var sign2 = data.substring(14, data.length);
            //        $("#timestamp").val(time);
            //        $("#sign").val(sign2);
            //        $("#Register").submit();
            //    },
            //});
            var url = "url:/Account/AccountInfoMiddlePage?realName=" + escape($("#realName").val()) + "&idCardNo=" + $("#idCardNo").val();
            $.dialog({
                content: url,
                width: '1200px',
                height: '800px',
                lock: true,
                background: '#000', /* 背景色 */
                opacity: 0.5,       /* 透明度 */
                drag: false,
                resize: false,
                close: function () {
                    parent.location.reload();
                    return true;
                }
            });
        }

        //查询个人的资金
        function ChaXun() {
            $.ajax({
                url: "/Account/SelectSftUserBalance",
                type: "Post",
                success: function (data) {
                    var obj = JSON.parse(data);
                    if (obj.errorCode == "200") {
                        $("#sftUserAmount").val(obj.totalAmount);
                    } else {
                        alert("数据错误");
                    }
                },
                data: "merchantNo=" + '@ViewBag.merchantNo',
            });
        }

        //去盛付通首页
        function QuShengFuTong() {
            //var sign = "merchantNo=" + $("#tzmerchantNo").val() + "&timestamp=temp&userName=" + $("#tzuserName").val();
            //sign = sign.replace(/\&/g, "|");
            //$.ajax({
            //    url: "/Account/GetSign2",
            //    type: "Post",
            //    success: function (data) {
            //        var time = data.substring(0, 14);
            //        var sign2 = data.substring(14, data.length);
            //        $("#tztimestamp").val(time);
            //        $("#tzsign").val(sign2);
            //        $("#formShouYe").submit();
            //    },
            //    data: "sign=" + sign,
            //});
            var url = "url:/Account/QuShengFuTongMiddlePage?userName=" + escape($("#tzuserName").val());
            $.dialog({
                content: url,
                width: '1200px',
                height: '800px',
                lock: true,
                fixed:true,
                background: '#000', /* 背景色 */
                opacity: 0.5,       /* 透明度 */
                drag: false,
                resize: false,
                title: '全局金服>盛付通托管平台',
                //close: function () {
                //    parent.location.reload();
                //    return true;
                //}
            });
        }
    </script>
}
<div class="RightContrent">
    <div style="margin-left: 50px; margin-right: 50px;">
        <div class="tab-content">
            <div class="line10"></div>
            <div class="line10"></div>
            <div class="tab_title">@ViewBag.Title</div>
            <div class="tab-content">
                <div style="width: 16px; height: 12px; float: left;">
                    <img src="~/Content/Images/leftarraw.png" />
                </div>
                <div class="tab-content_border">
                    <div style="text-align: left;">
                        <!--这里就是写注册盛付通的表单 -->
                        @{
                            if (Model.SFTUserId == null || Model.SFTUserId == "")
                            {
                                <form  id="Register">
                                    <table style="line-height: 50px;">
                                        <tr>
                                            <td>真实姓名:</td>
                                            <td>
                                                <input type="text" id="realName" name="realName" class="input txt" style="width: 200px;" datatype="*" /></td>
                                        </tr>
                                        <tr>
                                            <td>身份证号：</td>
                                            <td>
                                                <input type="text" id="idCardNo" name="idCardNo" class="input txt" style="width: 200px;" datatype="idcard" /></td>
                                        </tr>
                                    </table>
                                    <button type="button" class="btn BtnRegister"   id="BtnRegister">开 通</button>
                                    <input type="hidden" name="sign" id="sign" value="" />
                                </form>
                            }
                            else
                            {        
                                <a href="javascript:void(0)" onclick="QuShengFuTong()">查看账户信息</a>
                            }
                        }
                        <form>
                            <input type="hidden" name="userName" id="tzuserName" value="@ViewBag.userName"/>
                        </form>
                       
                    </div>
                    <div class="tab-content_border3">
                        <ul>
                            <li><span id="tip1" title="资金总额=可用余额+冻结金额" class="etips">账户总资产</span></li>
                            <li><span class="etips" title="可用余额=资金总额-冻结总额-待收总额，账户余额可用于投标或者提现">可用余额</span></li>
                            @*<li><span class="etips" title="投资金额是您投资的总额">投资金额</span></li>*@
                            <li><span class="etips" title="冻结总额是您当前暂时不能使用的金额，冻结总额包括投标冻结、借款保证金冻结、提现冻结">冻结金额</span></li>
                        </ul>
                        <ul>
                            @if (Model.SFTUserId == null || Model.SFTUserId == "")
                            {
                                <li class="tab-content-money">￥0.00</li>
                                <li class="tab-content-money">￥0.00</li>
                                <li class="tab-content-money">￥0.00</li>
                                <li class="tab-content-money">￥0.00</li>
                            }
                            else
                            {
                                <li class="tab-content-money">@Convert.ToDecimal(ViewBag.totalAmount).ToString("C")</li>
                                <li class="tab-content-money">@Convert.ToDecimal(ViewBag.availableAmount).ToString("C")</li>
                                @*<li class="tab-content-money">@ViewBag.Funds.TenderAmt.ToString("C")</li>*@
                                <li class="tab-content-money">@Convert.ToDecimal(ViewBag.frozenAmount).ToString("C")</li>
                            }

                        </ul>
                    </div>
                    <div class="tab-content_border3">
                        <ul>
                            <li>累计充值</li>
                            <li>累计投资</li>
                            <li>累计收益</li>
                        </ul>
                        <ul>
                            @if (Model.SFTUserId == null || Model.SFTUserId == "")
                            {
                                <li class="tab-content-money">￥0.00</li>
                                <li class="tab-content-money">￥0.00</li>
                                <li class="tab-content-money">￥0.00</li>
                            }
                            else
                            {
                                @*<li class="tab-content-money">@ViewBag.Funds.InComeAmt.ToString("C")</li>
                                <li class="tab-content-money">@ViewBag.Funds.TenderAmts.ToString("C")</li>
                                <li class="tab-content-money">@ViewBag.Funds.EarningsAmt.ToString("C")</li>*@
                                <li class="tab-content-money">@ViewBag.leijichongzhi.ToString("C")</li>
                                <li class="tab-content-money">@ViewBag.leijitouzi.ToString("C")</li>
                                <li class="tab-content-money">@ViewBag.leijishouyi.ToString("C")</li>
                            }

                        </ul>
                    </div>
                </div>
            </div>

            <div class="line10"></div>


        </div>

        <div class="line10"></div>
        <div>
            <div>
                <img src="~/Content/Images/title.png" />
            </div>
            <div style="width: 16px; height: 12px; float: left;"></div>
            <div class="listTips " style="border: 1px solid #e4e4e4; border-top: 0px; width: 861px; float: left; background-color: #faf9f9;">
                <div style="margin: 0px 20px 20px 20px; color: #999; font-size: 16px; line-height: 36px;">
                    盛付通支付账户系统全面保障您的资金安全:
                <br />
                    盛付通支付账户平台，致力于更好地服务互联网金融行业商户及平台。同时借助盛付通第三方支付的背景与优势，
                <br />
                    专门解决互联网网贷（P2P、P2B）、股权众筹、股票配资及金融理财类商户或平台的交易信息与资金流分离难题。
                <br />
                    盛付通依据商户或平台的交易指令进行资金流转处理，既保证了商户及客户支付账户资金独立性，也避免了商户或平台触碰客户资金的问题。
                <br />
                    盛付通支付账户平台彻底解决了商户或平台上的“资金池“难题，确保每个投资人、融资人资金及支付账户安全。
                系统保障：盛付通获得央行颁发的《支付业务许可证》,系统通过监管机构严格审查
                <br />
                    资金保障：您的支付账户资金全程风控监控，支付账户提现银行卡个人信息与实名认证信息一致，保证支付账户资金安全
                <br />
                    隐私保障：采用金融级账户安全加密技术，保证您的账户信息绝不外泄
                <br />
                    风控保障：制定严格的风控标准，对平台交易进行监控，及时发现异常交易
                    <br />
                </div>
            </div>
        </div>
    </div>
</div>

